<%@ page import="sige.Responsavel" %>
<!doctype html>
<html>
    <head>
        <meta name="layout" content="main">
        <g:set var="entityName" value="${message(code: 'responsavel.label', default: 'Responsavel')}" />
        <title><g:message code="default.show.label" args="[entityName]" /></title>
    </head>
    <body>
        <center>
          <h1><g:message code="default.show.label" args="[entityName]" /></h1>
        </center>    
        <ul class="breadcrumb">
            <li>
                <a href="${createLink(uri: '/')}">
                  <i class="icon-home"></i>
                  <g:message code="default.home.label"/>
                </a>
                <span class="divider"> . </span>
            </li>
            <li>
                <g:link action="list">
                    <i class="icon-list"></i>
                    <g:message code="default.list.label" args="[entityName]" />
                </g:link>
                <span class="divider"> . </span>
            </li>
            <li>
                <g:link class="create" action="create">
                    <i class="icon-file"></i>
                    <g:message code="default.new.label" args="[entityName]" />
                </g:link>
            </li>
        </ul>
        <div id="show-responsavel" class="content scaffold-show" role="main">
            
            <g:if test="${flash.message}">
              <div class="alert alert-info">
                <button type="button" class="close" data-dismiss="alert">&times;</button>
                ${flash.message}
              </div>
            </g:if>
            <div class="span8 offset3">
                <div class=" well">
                 
                <ol>
                    
                    <g:if test="${contratoId}">
                    <div >
					    <span>
					        <h5>
                              <g:message code="contrato.label" default="Dados do Contrato" />
                            </h5>
					    </span>
					
				    </div>
			        <div >
				        <span><g:message code="responsavel.contrato.id.label" default="ID do Contrato" /></span>
				
				        <span>
				            <g:link controller="contrato" action="show" id="${contratoId}" >
				                ${contratoId}
				            </g:link>
				        </span>
				
			        </div>
			        </g:if>
                    
            <!------------------------------DADOS DO RESPONSÁVEL------------------------------->
				    <div >
					    <span>
					        <h5>
                              <g:message code="dadosDoResponsavel.label" default="Dados do Responsável" />
                            </h5>
					    </span>
					
				    </div>
				    
				    <g:if test="${responsavelInstance?.nome}">
				    <li class="fieldcontain">
					    <span id="nome-label" class="property-label"><g:message code="responsavel.nome.label" default="Nome" /></span>
					
						    <span class="property-value" aria-labelledby="nome-label"><g:fieldValue bean="${responsavelInstance}" field="nome"/></span>
					
				    </li>
				    </g:if>
			
				    <g:if test="${responsavelInstance?.cpf}">
				    <li class="fieldcontain">
					    <span id="CPF-label" class="property-label"><g:message code="responsavel.cpf.label" default="CPF" /></span>
					
						    <span class="property-value" aria-labelledby="CPF-label"><g:fieldValue bean="${responsavelInstance}" field="cpf"/></span>
					
				    </li>
				    </g:if>
			
				    <g:if test="${responsavelInstance?.rg}">
				    <li class="fieldcontain">
					    <span id="rg-label" class="property-label"><g:message code="responsavel.rg.label" default="Rg" /></span>
					
						    <span class="property-value" aria-labelledby="rg-label"><g:fieldValue bean="${responsavelInstance}" field="rg"/></span>
					
				    </li>
				    </g:if>
			
				    <g:if test="${responsavelInstance?.nacionalidade}">
				    <li class="fieldcontain">
					    <span id="nacionalidade-label" class="property-label"><g:message code="responsavel.nacionalidade.label" default="Nacionalidade" /></span>
					
						    <span class="property-value" aria-labelledby="nacionalidade-label"><g:fieldValue bean="${responsavelInstance}" field="nacionalidade"/></span>
					
				    </li>
				    </g:if>
			
				    <g:if test="${responsavelInstance?.naturalidade}">
				    <li class="fieldcontain">
					    <span id="naturalidade-label" class="property-label"><g:message code="responsavel.naturalidade.label" default="Naturalidade" /></span>
					
						    <span class="property-value" aria-labelledby="naturalidade-label"><g:fieldValue bean="${responsavelInstance}" field="naturalidade"/></span>
					
				    </li>
				    </g:if>
			
				    <g:if test="${responsavelInstance?.estadoCivil}">
				    <li class="fieldcontain">
					    <span id="estadoCivil-label" class="property-label"><g:message code="responsavel.estadoCivil.label" default="Estado Civil" /></span>
					
						    <span class="property-value" aria-labelledby="estadoCivil-label"><g:fieldValue bean="${responsavelInstance}" field="estadoCivil"/></span>
					
				    </li>
				    </g:if>
				    
				    <g:if test="${responsavelInstance?.profissao}">
				    <li class="fieldcontain">
					    <span id="profissao-label" class="property-label"><g:message code="responsavel.profissao.label" default="Profissao" /></span>
					
						    <span class="property-value" aria-labelledby="profissao-label"><g:fieldValue bean="${responsavelInstance}" field="profissao"/></span>
					
				    </li>
				    </g:if>
			
	        <!--------------------------------DADOS DE CONTATO---------------------------------->
				    <div >
					    <span>
					        <h5>
                              <g:message code="dadosDeContato.label" default="Dados de Contato" />
                            </h5>
					    </span>
					
				    </div>
			
				    <g:if test="${responsavelInstance?.email}">
				    <li class="fieldcontain">
					    <span id="email-label" class="property-label"><g:message code="responsavel.email.label" default="Email" /></span>
					
						    <span class="property-value" aria-labelledby="email-label"><g:fieldValue bean="${responsavelInstance}" field="email"/></span>
					
				    </li>
				    </g:if>
			
				    <g:if test="${responsavelInstance?.rua}">
				    <li class="fieldcontain">
					    <span id="rua-label" class="property-label"><g:message code="responsavel.rua.label" default="Rua" /></span>
					
						    <span class="property-value" aria-labelledby="rua-label"><g:fieldValue bean="${responsavelInstance}" field="rua"/></span>
					
				    </li>
				    </g:if>
			
				    <g:if test="${responsavelInstance?.numero}">
				    <li class="fieldcontain">
					    <span id="numero-label" class="property-label"><g:message code="responsavel.numero.label" default="Numero" /></span>
					
						    <span class="property-value" aria-labelledby="numero-label"><g:fieldValue bean="${responsavelInstance}" field="numero"/></span>
					
				    </li>
				    </g:if>
			
				    <g:if test="${responsavelInstance?.bairro}">
				    <li class="fieldcontain">
					    <span id="bairro-label" class="property-label"><g:message code="responsavel.bairro.label" default="Bairro" /></span>
					
						    <span class="property-value" aria-labelledby="bairro-label"><g:fieldValue bean="${responsavelInstance}" field="bairro"/></span>
					
				    </li>
				    </g:if>
			
				    <g:if test="${responsavelInstance?.cep}">
				    <li class="fieldcontain">
					    <span id="cep-label" class="property-label"><g:message code="responsavel.cep.label" default="Cep" /></span>
					
						    <span class="property-value" aria-labelledby="cep-label"><g:fieldValue bean="${responsavelInstance}" field="cep"/></span>
					
				    </li>
				    </g:if>
			
				    <g:if test="${responsavelInstance?.cidade}">
				    <li class="fieldcontain">
					    <span id="cidade-label" class="property-label"><g:message code="responsavel.cidade.label" default="Cidade" /></span>
					
						    <span class="property-value" aria-labelledby="cidade-label"><g:fieldValue bean="${responsavelInstance}" field="cidade"/></span>
					
				    </li>
				    </g:if>
			
				    <g:if test="${responsavelInstance?.estado}">
				    <li>
					    <span id="estado-label" class="property-label"><g:message code="responsavel.estado.label" default="Estado" /></span>
					
						    <span class="property-value" aria-labelledby="estado-label"><g:fieldValue bean="${responsavelInstance}" field="estado"/></span>
					
				    </li>
				    </g:if>
				    
				    <g:if test="${responsavelInstance?.contratos}">
				    <li>
					    <span id="contratos-label"><g:message code="responsavel.contratos.label" default="Contratos" /></span>
					    <ul>
					    <g:each in="${responsavelInstance?.contratos}" var="c">
					        <li>
					            <g:if test="${c.ativo}">
					                <g:message code="responsavel.contrato.id.label" default="ID do contrato" />
						            <g:link controller="contrato" action="show" id="${c.id}">
						                <g:fieldValue bean="${c}" field="id"/>
						            </g:link>
						        </g:if>
						    </li>
						</g:each>
						</ul>
				    </li>
				    </g:if>
			
                </ol>
                </div>
                <g:form>
                    <fieldset class="form-actions span8">
                        <g:hiddenField name="id" value="${responsavelInstance?.id}" />
                        <g:link class="btn btn-warning" action="edit" id="${responsavelInstance?.id}">
                            <i class="icon-edit icon-white"></i>
                            <g:message code="default.button.edit.label" default="Edit" />
                        </g:link>
                        <a data-toggle="modal" href="#myModal" class="btn btn-danger">
                            <i class="icon-trash icon-white"></i>
                            <g:message code="default.button.delete.label" default="Delete" /> 
                        </a>
                    </fieldset>
                    <!--------MODAL----------->
                    <div class="modal hide" id="myModal">
                        <div class="modal-header">
                            <a class="close" data-dismiss="modal">×</a>
                            <h3><g:message code="default.button.delete.atention.message" default="Atenção!" /></h3>
                        </div>
                        <div class="modal-body">
                            <p><g:message code="default.button.delete.confirm.message" default="Are you sure?" /> </p>
                        </div>
                        <div class="modal-footer">
                            <a class="btn" data-dismiss="modal">
                                <g:message code="default.cancel.label" default="Cancelar" />
                            </a>
                            <g:actionSubmit class="btn btn-danger" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" />
                        </div>
                    </div>
                </g:form>
            </div><!--/span8-->
        </div><!--/show-responsavel-->
    </body>
</html>

